{# Load the tag library #}
{% load bootstrap4 %}

{# Load CSS and JavaScript #}
{% bootstrap_css %}
{% bootstrap_javascript jquery='full' %}

{# Display django.contrib.messages as Bootstrap alerts #}
{% bootstrap_messages %}

{% load i18n %}
{%  block content %}
{% if user.is_authenticated %}
<a href="{% url 'userprofile:profile' %}">{% trans "Profile" %}</a> | <a href="{% url 'account_email' %}">Manage
	Email</a>  | <a href="{% url 'account_change_password' %}">Change Password</a> |
<a href="{% url 'account_logout' %}">Logout</a>
{% endif  %}


<p>{% trans "Welcome" %},{{ user }}</p>
<div class="form_container">  {#这里action默认为当前路由，视图判断处理 #}
	<form method="post" action="" enctype="multipart/form-data">
		{% csrf_token %}
<!--		{% for field in form %}-->
<!--		<div class="form-item">-->
<!--			{{ field.errors }}-->
<!--			{{  field.label_tag }} {{ field }}-->
<!--			{% if field.help_text %}-->
<!--			<p class="help">{{ field.help_text|safe }}</p>-->
<!--			{% endif %}-->
<!--		</div>-->
<!--		{% endfor %}-->
		{% bootstrap_form form  %}
	 	{% bootstrap_button "Update" button_type="submit" button_class="btn-primary"  size='lg' %}
	</form>

</div>
{%  endblock %}

